<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="<%=basePath%>">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link rel="stylesheet" type="text/css"	href="<%=basePath %>admin/assets/jquery-easyui-1.4.3/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=basePath %>admin/assets/jquery-easyui-1.4.3/themes/icon.css">
<script type="text/javascript" src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="<%=basePath %>admin/assets/css/backOffice/myeasyui_base.css" type="text/css"></link>
<body>
    <div class="topTitle">
    	字典管理
    </div>
    <!-- Begin 右键菜单 -->
     <div id="parentMenu" class="easyui-menu" style="width:120px;">  
    	<div name="addDescription"  data-options="iconCls:'icon-book_addresses_add'" onclick="addDictionary()">添加字典</div>  
  	</div>
     <div id="treeMenu" class="easyui-menu" style="width:120px;">  
    	<div name="addDescription"  data-options="iconCls:'icon-book_addresses_add'" onclick="addDictionary()">添加字典</div>  
    	<div name="modify"  data-options="iconCls:'icon-bookmark_edit'" onclick="modifyDictionary()">修改字典</div>
    	<div name="remove"  data-options="iconCls:'icon-bookmark_delete'" onclick="removeDictionary()">移除字典</div>  
  	</div>
    <!-- End 右键菜单 -->
    
   
    
  
 	 <!-- Begin 字典面板 -->
 	<div id="main_layout" class="easyui-layout">
	    <div data-options="region:'west',title:'字典目录',collapsible:false,split:true" style="width:185px;">
	    	<ul id="dic_tree"></ul>
	    </div>
	    <div data-options="region:'center',title:'字典详情'" style="padding:5px;background:#eee;">
	    	<table class="easyui-datagrid"  id="dictionary_data" 
				data-options="rownumbers:true,singleSelect:true,url:'admin/dictionary/dic_getDictionaryDataJson.action',method:'get',toolbar:'#btn_dictionaryData',pagination:true,fit:true"  >
			<thead>
				<tr>
					<th data-options="field:'dicDataId',width:100,hidden:true">编号</th>
					<th data-options="field:'dictionary.dicName',width:100">所属字典</th>
					<th data-options="field:'dicValue',width:100">详情名称</th>
					<th data-options="field:'dicKey',width:60,align:'center'">对应键</th>
					<th data-options="field:'status',width:60,align:'center'" formatter="dictionaryDataStatusFormatter">使用状态</th>
					<th data-options="field:'remark',width:200">标注</th>
				</tr>
			</thead>
		</table>
    </div>
</div>
	<!-- End 字典面板 -->
	
	 <!-- Begin 菜单详情操作按钮 -->
    <div id="btn_dictionaryData" style="height:auto">
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="addDictionaryData()">添加</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="removeDictionaryData()">删除</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="modifyDictionaryData()">修改</a>
	</div>
    <!-- End 菜单详情操作按钮 -->
	
	<!-- Begin 添加字典项表单 -->
	<div id="dictionary_form_dialog" class="easyui-dialog"  style="padding:10px" data-options="modal:true,closed:true,resizable:true">
		<form id="dictionary_form" method="post">
	    	<table cellpadding="5">
				<input type="hidden" id="form_dicId_hidden" name="dictionary.dicId"/>
	    		<tr>
	    			<td>中文标识:</td>
	    			<td><input class="easyui-textbox" type="text" id="form_description" name="dictionary.description" data-options="" required="true" validType="checkDicDescription"></input></td>
	    		</tr>
	    		<tr>
	    			<td>英文标识:</td>
	    			<td><input class="easyui-textbox" type="text" id="form_dicName" name="dictionary.dicName" data-options="" required="true" validType="checkDicName"></input></td>
	    		</tr>
	    	</table>
	    </form>
	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">提交</a>
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="form_init()">重置</a>
	    </div>
	</div>
	<!-- End 添加字典项表单 -->
	
	<!-- Begin 字典详情表单 -->
	<div id="dictionaryData_form_dialog" class="easyui-dialog"  style="padding:10px" data-options="modal:true,closed:true,resizable:true">
		<form id="dictionaryData_form" method="post">
	    	<table cellpadding="5">
	    	<input type="hidden" id="form_dicDataId_Hidden" name="dictionaryData.dictionary.dicId" />
				<tr>
	    			<td style="text-align: right;">编号:</td>
	    			<td><input class="easyui-textbox" type="text" id="form_dicDataId" name="dictionaryData.dicDataId" data-options="" readonly="readonly"></input></td>
	    		</tr>
	    		<tr>
	    			<td style="text-align: right;">所属字典:</td>
	    			<td><input class="easyui-textbox" type="text" id="form_dictionaryName" name="" data-options="" readonly="readonly"></input></td>
	    		</tr>
	    		<tr>
	    			<td style="text-align: right;">详情名称:</td>
	    			<td><input class="easyui-textbox" type="text" id="form_dicValue" name="dictionaryData.dicValue" data-options="" required="true" validType="checkDicValue"></input></td>
	    		</tr>
	    		<tr>
	    			<td style="text-align: right;">对应键:</td>
	    			<td><input class="easyui-textbox" type="text" id="form_dicKey" name="dictionaryData.dicKey" data-options="" required="true" validType="checkDicKey"></input></td>
	    		</tr>
	    		<tr>
	    			<td style="text-align: right;">使用状态:</td>
	    			<td><input  type="checkbox" id="form_status" name="dictionaryData.status" onclick="setCheckBoxValue(this,1,0)"></input></td>
	    		</tr>
	    		<tr>
	    			<td style="text-align: right;">标注:</td>
	    			<td>
	    			<textarea name="dictionaryData.remark" id="form_remark"  cols="" rows="3"></textarea>
	    			</td>
	    		</tr>
	    	</table>
	    </form>
	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitDataForm()">提交</a>
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="form_dictionaryData_init()">重置</a>
	    </div>
	</div>
	<!-- End 字典详情表单 -->
	
	<!-- Hidden 隐藏表单 -->
	 <input type="hidden" id="hidden_selectTreeNodeId" ><!-- 记录右键选择菜单树的编号 -->

	<script type="text/javascript" src="<%=basePath %>admin/assets/js/BackOffice/mine-function.js"></script>
	<script type="text/javascript" src="<%=basePath %>admin/base/dictionary/js/dictionary_dictionary.js"></script>
</body>
</html>
